﻿using OrBitDataModule.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OrBitDataModule.Models
{
    public class DataProtocol
    {
        public bool IsSuccess { get; set; }
        public string ReturnMessage { get; set; }
        public ProtocolItem[] Data { get; set; }
    }

    public class ProtocolItem
    {
        public string DataProtocolId { get; set; }
        public string ProtocolName { get; set; }
        public string ProtocolType { get; set; }
        public string ProtocolSetting { get; set; }
        public string DataProtocolScriptId { get; set; }
        public string ScriptName { get; set; }
        public string ApiName { get; set; }
        public string ApiUserName { get; set; }

        private string apiPassword;
        public string ApiPassword
        {
            get
            {
                return EncryptionHelper.Decode(apiPassword);
            }
            set { apiPassword = value; }
        }
    }
}
